# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-flask-appconfig
pkgver=0.11.1.20151214
_commit=56528264cdc76dc1b00804b7f67908d3bb1b1b0e
pkgrel=7
pkgdesc="Configures Flask applications in a canonical way"
url="https://github.com/mbr/flask-appconfig"
license=('MIT')
arch=('any')
depends=('python-click' 'python-flask' 'python-six')
makedepends=('python-setuptools')
checkdepends=('python-pytest-runner')
source=("$pkgname-$_commit.tar.gz::https://github.com/mbr/flask-appconfig/archive/$_commit.tar.gz")
sha512sums=('b04dbf4de2ebc99232d0a8300004c2b49be97cff35cf4b10c2c63ab43e6b740d4ee9a44cf578b7f3727403102da4197e99db02398ba5f247c28ae28283ca1199')

prepare() {
  mv flask-appconfig-{$_commit,$pkgver}
}

build() {
  cd flask-appconfig-$pkgver
  python setup.py build
}

check() {
  cd flask-appconfig-$pkgver
  python setup.py pytest
}

package() {
  cd flask-appconfig-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
